<?php
    header("Content-type:text/html;charset=utf-8");
    //连接数据库
    $conn = mysql_connect("localhost","root","root");
    //选择数据库
    mysql_select_db("id");
    //获取请求过来的数据
    $theId = $_POST["name"];
 
    $result = mysql_query("select * from xiaomi where id = '$theId'");
    
    $rows= mysql_num_rows($result);

    if($rows == 1){
        echo "false";
    }else{
        echo "true";
    };

    mysql_close($conn);
?>